We investigated the relationships among interstitial salinity, leaf sclerophylly, plant vigor, and population density for the leaf galling insect Cecidomyia avicenniae (Diptera: Cecidomyiidae) on its host plant Avicennia germinans (Avicenniaceae). Sampling was done in six mangrove stands and in one varzea forest of Maranhão, northeast Brazil. At each site, ten shoots were randomly taken on five A. germinans trees. From each shoot we counted the total number of galls and recorded the shoot length (cm). We also recorded the average length, width, total area, and biomass of leaves per shoot. Leaf sclerophylly was quantified by leaf biomass per unit area (g/cm2). Samples of interstitial water were taken by a 1.3-cm PVC tube with 80 cm of depth, and salinity (ppt) was measured with a refractometer. Leaf sclerophylly showed a positive relationship with interstitial salinity (R2 = 0.77, P < 0.05). We also observed positive relationships between gall density per unit of leaf area (cm2) and salinity (r = 0.36, P < 0.05), and between gall density and leaf sclerophylly (r = 0.40, P < 0.05). The salinity and the leaf sclerophylly together explained 22 percent of the variation in gall density of C. avicenniae. We found a negative relationship between the number of galls per centimeter and shoot length (R2 = 0.50, P < 0.05). Thus, longer shoots of A. germinans showed lower gall density. Our results suggest that the gall density of C. avicenniae on A. germinans is affected by the salinity of host plant habitat and by leaf sclerophylly along an interstitial salinity gradient.